package fitness;

import optimizers.ganeat.triangle.ConstantsTriangle;
import optimizers.ganeat.triangleup.ConstantsTriangleUp;

public class TriangleUpFitness extends SineFitness {
	@Override
	public double goal(int i, int firstPeak) {
		return ConstantsTriangleUp.height
				* ((i - firstPeak + ConstantsTriangleUp.period) % ConstantsTriangleUp.period)
				/ ConstantsTriangleUp.period;
	}

}
